package zouhaotian.rbac.domain.vo;

import zouhaotian.rbac.domain.enums.RoleDateScope;
import zouhaotian.rbac.util.DateTimeUtils;

import java.time.LocalDateTime;

/**
 * 视图对象类型-角色
 *
 * @auther 邹昊天
 * @since 2025/6/19 23:13
 */
public class Rolevo extends Basevo {

    /**
     * 角色名称
     */
    public String name;

    /**
     *
     * 角色电话
     */
    public RoleDateScope dataScope;

    public Rolevo() {
    }

    public Rolevo(Integer id, LocalDateTime createAt, LocalDateTime updateAt, String name, RoleDateScope dataScope) {
        super(id, createAt, updateAt);
        this.name = name;
        this.dataScope = dataScope;
    }

    @Override
    public String toString() {
        return String.format("ID:%d, 名称:%s, 数据访问范围: %s, 更新时间: %s", id, name, dataScope, DateTimeUtils.format(updateAt));
    }
}
